package stu.cms.test;

public class BattleSimulation {
    public void attack(BattleObj battleObj1, BattleObj battleObj2) {
        battleObj2.setHp(battleObj2.getHp() - battleObj1.getAck());
        System.out.println(battleObj1.getName() + "攻击了" + battleObj2.getName() + "，" + battleObj2.getName() + "受到了" + battleObj1.getAck() + "点伤害，" + battleObj2.getName() + "剩余血量" + battleObj2.getHp());
    }

    public boolean isDead(BattleObj battleObj) {
        return battleObj.getHp() <= 0;
    }
}
